Optimal. Leaf size=65 \[ -\frac {2 \text {ArcTan}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right ) \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}}{\sqrt {1-\cos (x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4485, 2854,
210} \begin {gather*} -\frac {2 \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)} \text {ArcTan}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right )}{\sqrt {1-\cos (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 2854
Rule 4485
Rubi steps
\begin {align*} \int \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \, dx &=\frac {\left (\sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}\right ) \int \frac {\sqrt {1-\cos (x)}}{\sqrt {a-\cos (x)}} \, dx}{\sqrt {1-\cos (x)}}\\ &=\frac {\left (2 \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right )}{\sqrt {1-\cos (x)}}\\ &=-\frac {2 \tan ^{-1}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right ) \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}}{\sqrt {1-\cos (x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 64, normalized size = 0.98 \begin {gather*} -\sqrt {2} \sqrt {\frac {-1+\cos (x)}{-a+\cos (x)}} \sqrt {-a+\cos (x)} \csc \left (\frac {x}{2}\right ) \log \left (\sqrt {2} \cos \left (\frac {x}{2}\right )+\sqrt {-a+\cos (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.19, size = 67, normalized size = 1.03
method | result | size |
default | \(-\frac {\sqrt {2}\, \sqrt {\frac {-1+\cos \left (x \right )}{-a +\cos \left (x \right )}}\, \sin \left (x \right ) \sqrt {-\frac {2 \left (-a +\cos \left (x \right )\right )}{\cos \left (x \right )+1}}\, \arctan \left (\frac {\sqrt {-\frac {2 \left (-a +\cos \left (x \right )\right )}{\cos \left (x \right )+1}}\, \sqrt {2}}{2}\right )}{-1+\cos \left (x \right )}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 32, normalized size = 0.49 \begin {gather*} -\arctan \left (-\frac {{\left (a - 2 \, \cos \left (x\right ) - 1\right )} \sqrt {-\frac {\cos \left (x\right ) - 1}{a - \cos \left (x\right )}}}{2 \, \sin \left (x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {1 - \cos {\left (x \right )}}{a - \cos {\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 46, normalized size = 0.71 \begin {gather*} 2 \, \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + \tan \left (\frac {1}{2} \, x\right )^{2} + a - 1}\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )^{3} + \tan \left (\frac {1}{2} \, x\right )\right ) \mathrm {sgn}\left (a - \cos \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {-\frac {\cos \left (x\right )-1}{a-\cos \left (x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________